//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package common;

public enum ActionCode {
	none,
	empty,
	CONNECTION_FAILED,
	CONNECTION_LOST,
	LOGIN_FAILED,
	LOGIN_FAILED1,
	AUTO_DISCONNECTED,
	WRONG_CLIENT_VERSION,
	OUT_OF_SYNC,
	BANNED,
	SERVER_MAINTENANCE,
	IAP_NOTE,
	PERSONAL_BREAK,
	LOGGED_FROM_ANOTHER_DEVICE,
	UNLOCK_UNAVAILABLE,
	PURCHASE_FAILED;

	private ActionCode() {
	}

	public static ActionCode get(int codenum) {
		switch (codenum) {
			case 1:
				return empty;
			case 2:
				return CONNECTION_FAILED;
			case 3:
				return CONNECTION_LOST;
			case 4:
				return LOGIN_FAILED;
			case 5:
				return LOGIN_FAILED1;
			case 6:
				return AUTO_DISCONNECTED;
			case 7:
				return OUT_OF_SYNC;
			case 8:
				return WRONG_CLIENT_VERSION;
			case 9:
				return BANNED;
			case 10:
				return SERVER_MAINTENANCE;
			case 11:
				return IAP_NOTE;
			case 12:
				return PERSONAL_BREAK;
			case 13:
				return LOGGED_FROM_ANOTHER_DEVICE;
			case 14:
				return UNLOCK_UNAVAILABLE;
			case 15:
				return PURCHASE_FAILED;
			default:
				return none;
		}
	}

	public String getText() {
		switch (this.ordinal()) {
			case 2:
				return "Empty.";
			case 3:
				return "Unable to connect with the server.";
			case 4:
				return "You have lost connection with the server.";
			case 5:
			case 6:
				return "Please try again later.";
			case 7:
				return "You have been disconnected due to inactivity.";
			case 8:
				return "Good news! A new version of the game is available.";
			case 9:
				return "Client and server are out of sync!";
			case 10:
				return "You have been banned temporarily";
			case 11:
				return "Sorry, the servers are under maintenance. Please try again later.";
			case 12:
				return "The game is free to play, but you can speed up your progress with in-app purchases. If desired, purchases can be disabled in your device\'s settings. You must also be 13+ to play.";
			case 13:
				return "You have been playing for too long and your villagers need to rest for a few minutes.";
			case 14:
				return "Another device is connecting to this village.";
			case 15:
				return "Account unlock is unavailable at the moment. Please try again later!";
			case 16:
				return "Billing server not responding. Please try again later.";
			default:
				return "None.";
		}
	}
}
